<template>
    <view class="swiper">
        <wd-swiper
            value-key="url"
            :list="videoList"
            :muted="false"
            autoplay
            stopAutoplayWhenVideoPlay
            :autoplayVideo="false"
            :indicator="{ type: 'fraction' }"
            indicator-position="top-right"
        ></wd-swiper>
    </view>
</template>

<script setup lang="ts">
import { GetSwiperList_API } from '@/server/home/home'
import { slideshowT } from '@/types/home'
const videoList = ref<slideshowT[]>([])
const getList = async () => {
    const res = await GetSwiperList_API()
    if (res.code === 200) {
        videoList.value = res.data
    }
}
onLoad(() => {
    getList()
})
</script>

<style lang="scss">
.swiper {
    margin: 8rpx 32rpx 8rpx 32rpx;
    box-shadow: 0rpx 4rpx 20rpx 0rpx rgb(102, 102, 102, 0.5);
    border-radius: 16rpx;
}
</style>
